<%@ Page Language="C#" MasterPageFile="~/Demo.master" AutoEventWireup="true" 
    Inherits="SharpPieces.DemoApp.ImageCheckBoxPostBacks" 
    CodeBehind="ImageCheckBoxpostbacks.aspx.cs" %>
    
<asp:Content ID="Content2" ContentPlaceHolderID="headPlaceHolder" Runat="Server">
    <title>SharpPieces - ImageCheckBox Postback - Live Demo</title>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="descriptionPlaceholder" Runat="Server">
    <h1>ImageCheckBox Postback</h1>

    <p>SharpPieces ImageCheckBox 
    control is a highly customizable CheckBox replacement, with exactly the same functionality 
    as the classical CheckBox, but a lot better look & feel.</p>
</asp:Content>
    
<asp:Content ID="Content1" ContentPlaceHolderID="demoPlaceholder" Runat="Server">
    <div class="checkboxDemo">
        <asp:Label ID="lblTime" runat="Server"></asp:Label><br />
        
        <script type="text/javascript">
            function CheckPrevent(checkboxInstance) {
                if(document.getElementById(<%=chkPreventPostback.ClientID%>._checkValueID).value == "1") {
                    alert("Sorry, no postback");
                    return false;
                }
                return true;
            }
        </script>
        <piece:ImageCheckBox ID="chkPostback" Text="Do a postback!" runat="server" 
            OnClientBeforeChange="CheckPrevent" AutoPostBack="true"></piece:ImageCheckBox>
        <piece:ImageCheckBox ID="chkPreventPostback" Text="Prevent postback?" runat="server" ></piece:ImageCheckBox>
    </div>
</asp:Content>


